package com.fh.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fh.base.BasicDAO;
import com.fh.dao.UserMapper;
import com.fh.model.User;

@Service
public class UserService implements BasicDAO<User> {
	@Autowired
	private UserMapper mapper;
	public int deleteByPrimaryKey(Long id) {
		
		return mapper.deleteByPrimaryKey(id);
	}

	public int insertSelective(User entity) {
		
		return mapper.insertSelective(entity);
	}

	public User selectByPrimaryKey(Long id) {
		
		return mapper.selectByPrimaryKey(id);
	}

	public int updateByPrimaryKeySelective(User entity) {
		
		return mapper.updateByPrimaryKeySelective(entity);
	}
	
	public User findByUser(User user){
		return mapper.findByUser(user);
	}

}
